package com.platform.controller.backend;

import com.github.pagehelper.PageInfo;
import com.platform.base.BaseController;
import com.platform.common.Const;
import com.platform.common.ServerResponse;
import com.platform.util.NumberUtil;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * 专家信息控制层
 */
@RestController
@RequestMapping("/psad0001Controller/")
@CrossOrigin(origins = Const.REQUESTURL,maxAge = 3600,allowCredentials = "true")
public class Psad0001Controller extends BaseController {

    /**
     * 条件查询专家信息
     * @param paramMap
     * @return
     */
    @GetMapping("selectByParamMap.do")
    public ServerResponse<PageInfo> selectByParamMap(@RequestParam Map paramMap){
        return iPsad0001Service.selectByParamMap(paramMap);
    }

    /**
     * 查询专家详细信息
     * @param userName
     * @return
     */
    @GetMapping("selectByUserName.do")
    public ServerResponse<Map> selectByUserName(@RequestParam(value = "userName") String userName){
        return iPsad0001Service.selectByUserName(userName);
    }

    /**
     * 更新
     * @param paramMap
     * @return
     */
    @PostMapping("update.do")
    public ServerResponse<String> update(@RequestParam Map paramMap, HttpServletRequest request){
        return iPsad0001Service.update(paramMap,request);
    }

    /**
     * 更新专家状态
     * @param paramMap
     * @return
     */
    @PostMapping("updatePsadStatus.do")
    public ServerResponse<String> updatePsadStatus(@RequestParam Map paramMap,HttpServletRequest request){
        return iPsad0001Service.updatePsadStatus(paramMap,request);
    }
}
